package day04;

import java.util.Random;
import java.util.Scanner;

public class HomeWork {
    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
       /* System.out.println("请输入你要办的业务：1、存款 2、取款 3、查询余额 4、退卡");*/
        /*int command= scan.nextInt();
        switch (command){
            case 1:
                System.out.println("存款");
                break;
            case 2:
                System.out.println("取款");
                break;
            case 3:
                System.out.println("查询余额");
                break;
            case 4:
                System.out.println("退卡成功");
                break;
            default:
                System.out.println("输入错误");
        }*/
       /* int num= scan.nextInt();
        System.out.println("输入你需办的业务:1、存款 2、取款 3、查询余额 0、退卡");
        switch (num){
            case 1:
                System.out.println("存款");
                break;
            case 2:
                System.out.println("取款");
                break;
            case 3:
                System.out.println("查询余额");
                break;
            case 0:
                System.out.println("退卡成功");
                break;
            default:
                System.out.println("输入错误");
        }*/
        int num= (int) (Math.random()*1000+1);
        int guess= scan.nextInt();
        while (guess!=num){
            if (guess>num){
                System.out.println("猜大了");
            }else {
                System.out.println("猜小了");
            }
            System.out.println("继续猜");
            guess= scan.nextInt();
        }
        System.out.println("猜对了，真聪明");


        }

    }

